package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.entity.HealthAdvice;
import com.itheima.pojo.Member;
import com.itheima.pojo.MemberInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

import java.util.List;
import java.util.Map;

public interface MemberDao {
    public List<Member> findAll();
    public Page<Member> selectByCondition(String queryString);
    public void add(Member member);
    public void deleteById(Integer id);
    public Member findById(Integer id);
    public Member findByTelephone(String telephone);
    public void edit(Member member);
    public Integer findMemberCountBeforeDate(String date);
    public Integer findMemberCountByDate(String date);
    public Integer findMemberCountAfterDate(String date);
    public Integer findMemberTotalCount();

    //通过会员id查询相关健康信息
    HealthAdvice findHealthAdvice(Integer id);


    List<String> findFoods(int healthAdviceId);

    List<String> findSports(int healthAdviceId);

    String findByHealthAdviceId(int healthAdviceId);

    String findMemberNameByHealthAdviceId(int healthAdviceId);
    public long findCountByCheckItemId(Integer id);
    List<MemberInfo> findByIds(@Param("id") Integer id);
    Member findByTel(@Param("phoneNumber") String phoneNumber);
    List<Integer> findOrderByMemId(@Param("id") Integer id);

    Member findByFileNumber(String fileNumber);
}
